package com.pomelo.tiku.interfaces;

import com.pomelo.tiku.beans.LoginBean;
import com.pomelo.tiku.beans.RegisterBean;

import java.util.HashMap;

/**
 * @author liuxiangwang
 * @date .
 */
public interface Contract {

    interface IRegisterView extends IView {
        void registerSuccess(RegisterBean registerBean);
        void registerFailed(String message);
    }

    interface IRegisterPresenter extends IPresenter {
    }
    interface IRegisterModel extends IBaseModel {
        void register(String url, HashMap<String,String> header, HashMap<String,String> data, Boolean isFormBody,IRegisterResult result);
        interface IRegisterResult {
            void onStart();
            void onSuccess(RegisterBean registerBean);
            void onFailed(String message);
            void onHttpFailed(String message);
        }
    }


    interface ILoginView extends IView {
        void loginSuccess(LoginBean loginBean);
        void loginFailed(String message);
    }

    interface ILoginPresenter extends IPresenter {

    }

    interface ILoginModel extends IBaseModel {
        void login(String url, HashMap<String,String> header, HashMap<String,String> data, Boolean isFormBody,ILoginResult result);
        interface ILoginResult {
            void onStart();
            void onSuccess(LoginBean loginBean);
            void onFailed(String message);
            void onHttpFailed(String message);
        }
    }
}
